﻿using System;
using System.Collections.Generic;

namespace Sustainalytics.ClientDW.Entities
{
    public class GCCompanyProfileBasic : IEqualityComparer<GCCompanyProfileBasic>
    {
        public Guid Id { get; set; }
        public string Name { get; set; }
        public string NameLowercase { get; set; }
        public string NameUrlFriendly { get; set; }

        public bool Equals(GCCompanyProfileBasic x, GCCompanyProfileBasic y)
        {
            if (x == null && y == null)
                return true;

            if (x == null || y == null)
                return false;

            return
                x.Id == y.Id
                && x.Name == y.Name
                && x.NameLowercase == y.NameLowercase;
        }

        public int GetHashCode(GCCompanyProfileBasic obj)
        {
            return this.Id.GetHashCode();
        }
    }
}
